<script setup>
import { ref } from 'vue'
import { RouterLink } from 'vue-router'

let text = ref('')
let input = ref('')
</script>

<template>
  <div class="creation">
    <div class="top">
      <div class="title">
        <el-input 
          v-model="input" 
          maxlength="200"
          placeholder="请输入文章标题" 
          show-word-limit
          type="text"
          clearable
        />
      </div>
      <div class="btn">
          <span>文章将自动保存至草稿箱</span>
          <el-button>草稿箱</el-button>
          <el-button type="primary">发布</el-button>
          <el-button type="success">
          <router-link to="/">返回首页</router-link>
        </el-button>
        </div>
  </div>
    <v-md-editor v-model="text" height="696px"></v-md-editor>
  </div>
</template>

<style lang="less" scoped>
  .top{
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
    .title{
      flex: 2;
    }
    .btn{
      flex: 1;
      padding: 0 6px;
      height: 62px;
      line-height: 62px;
      background-color: #fff;
      span{
        display: inline-block;
        padding: 0 10px;
        width: 210px;
        text-align: center;
        color: #9c9898;
      }
    }
  }
  .el-input__inner{
    height: 80px !important;
  }
</style>
<style>
  .top .el-input__inner{
    height: 60px;
    font-size: 25px;
    border: none;
  }
  .el-input__inner::placeholder{
    font-size: 25px;
  }
</style>
